package org.example.lang;

import java.math.BigDecimal;

/**
 * @Title : BigDecimalTest
 * @Description:
 * @author: libo@juzishuke.com
 * @date: 2023/12/28 11:17
 * @Version:1.0
 */
public class BigDecimalTest {

    public static void main(String[] args) {
        BigDecimal repayAmt = BigDecimal.ZERO;
        BigDecimal repayAmt2 = new BigDecimal(0).add(new BigDecimal(1.0)).subtract(new BigDecimal("1.0"));
        repayAmt2.setScale(10);
        System.out.println(BigDecimal.ZERO.equals(repayAmt));
        System.out.println(BigDecimal.ZERO.equals(repayAmt2));
    }

}
